<?php

define('DBHOST', 'Enter DB host here');
define('DBUSER', 'Enter DB user here');
define('DBPWD', 'Enter DB password here');
define('DBNAME', 'Enter DB name here');

define('SITE_ROOT', 'Enter site root here');

define('SCRIPT_PWD', 'Enter the password for the scripts');

define('USERTOKEN', readXML("user/token"));
define('USERTOKENSECRET', readXML("user/tokensecret"));

define('CHPPID', 'Enter chpp id here');
define('CONSUMERKEY', 'Enter consumerkey here');
define('CONSUMERSECRET', 'Enter consumersecret here');

define('VERSION', 'Maptrick v3.3');

function readXML($path) {
	$xml = simplexml_load_file(SITE_ROOT . 'config/maptrick.xml');
	$result = $xml->xpath($path);
	
	if (count($result) == 1) {
		foreach ($result as $XMLElement) {
			$value = $XMLElement[0];
		}
		return $value;
	}
	else return null;
}

?>